" tmux
let g:ScreenShellCmd= 'python'
let g:ScreenShellActive= 0
function! s:ScreenShellListener()
  if g:ScreenShellActive
    if g:ScreenShellCmd == 'python'
      nmap <buffer> <C-c><C-c> :ScreenSend<cr>
    else
      nmap <buffer> <C-c><C-c> <Nop>
    endif
  else
    nmap <buffer> <C-c><C-c> :ScreenShell python<cr>
    let g:ScreenShellActive= 1
  endif
endfunction

call s:ScreenShellListener()
augroup ScreenShellEnter
  autocmd User *.py call <SID>ScreenShellListener()
augroup END
augroup ScreenShellExit
  autocmd User *.py call <SID>ScreenShellListener()
augroup END


